package com.famdoc.Mapper;
import com.famdoc.Pojo.dto.CheckForm;
import com.famdoc.Pojo.entity.CheckBody;
import com.famdoc.Pojo.entity.CheckItem;
import com.famdoc.Pojo.entity.Doctor;
import com.famdoc.Pojo.entity.Patient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
public interface PatientMapper {

      int addCheckItem (@RequestBody CheckItem checkItem);

      int addCheckBody (@RequestBody CheckBody checkBody);
      List<Patient> selectPatient (@Param("doctor_id") Integer doctor_id, @Param("name") String name,@Param("idNumber") String idNumber, @Param("phoneNumber")String phoneNumber);
      List<CheckForm> selectCheckItem (@Param("id") Integer id);
      Integer updateCheckItem(@RequestBody CheckItem checkItem);
      Integer countCheckItemPTim(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      Integer countSinging(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      Integer countArchive(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      Integer countVisitPNum(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      Integer countVisitPTim(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      Integer countCheckItemPNum(@Param("diseaseName") String diseaseName, @Param("startingTime") String startingTime,@Param("endingTime") String endingTime);
      List<Patient> selectArchiveDetail(@Param("diseaseName") String diseaseName);
      Integer deleteCheck(@Param("checkItem_id")Integer checkItem_id);
      List<Patient> downloadPatientInfo();
      void uploadPatientInfo(List<Patient> list);

      Integer UP(Patient patient);
}
